package org.example;

import org.apache.mina.core.future.ConnectFuture;
import org.apache.mina.core.future.IoFuture;
import org.apache.mina.core.future.IoFutureListener;
import org.apache.mina.core.session.IoSession;
import org.example.socket.ClientSocketHandler;
import org.example.socket.ClientSocketManager;
import org.example.socket.ServerSocketManager;

/**
 * Hello world!
 *
 */
public class App
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
    }

    public void initServerSocket(){
        ServerSocketManager.getInstance().initSocket();
    }

    public void initClientSocket(){
        ClientSocketManager.getInstance().initSocket("",new IoFutureListener<IoFuture>() {
            public void operationComplete(IoFuture future) {
                IoSession ioSession = future.getSession();
                ConnectFuture connFuture = (ConnectFuture) future;
            }
        });
    }
}
